package com.shujia.wyh.day05;

/*
        键盘录入一个数据n(1<=n<=9)，输出对应的nn乘法表
 */
import java.util.Scanner;
public class FunctionTest4 {
    public static void main(String[] args) {
        //创建键盘录入对象
        Scanner sc = new Scanner(System.in);
        System.out.println("请输入数据n(1~9):");
        int num = sc.nextInt();
        jiuJiuChengFa(num);


    }
    /**
     *
     *  返回值类型：void
     *  参数列表：int n
     */
    public static void jiuJiuChengFa(int n){
        for(int i=1;i<=n;i++){
            for(int j=1;j<=i;j++){
                System.out.print(i+"*"+j+"="+(i*j)+"\t");
            }
            System.out.println();
        }
    }


}
